<!DOCTYPE html>
<html style="background-color: #f2f2f2;" lang="en">
<%include("/common/header.html",{title:''}){}%>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">

        <div class="layui-row layui-col-space15">
            <div class="layui-col-md6">
                <div class="layui-card">
                    <div class="layui-card-header">快捷方式</div>
                    <div class="layui-card-body">

                        <div class="layui-carousel layadmin-carousel layadmin-shortcut">
                            <div carousel-item>
                                <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs3">
                                        <a lay-href="base/link/@/daili/index.jhtml">
                                            <i class="layui-icon iconfont layui-extend-gouwudingdan1"></i>
                                            <cite>购物订单</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs3">
                                        <a lay-href="base/link/@/daili/addService.jhtml">
                                            <i class="layui-icon iconfont layui-extend-zengzhifuwu1"></i>
                                            <cite>增值服务订单</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs3">
                                        <a lay-href="base/link/@/userorder/salespersonlist.jhtml">
                                            <i class="layui-icon iconfont layui-extend-xiaoshouyuan"></i>
                                            <cite>销售员列表</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs3">
                                        <a lay-href="base/link/@/daili/userList.jhtml">
                                            <i class="layui-icon iconfont layui-extend-tenantuser"></i>
                                            <cite>用户管理</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs3">
                                        <a lay-href="base/link/@/userorder/cashorder.jhtml">
                                            <i class="layui-icon iconfont layui-extend-tenantuser"></i>
                                            <cite>提现订单</cite>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

            <div class="layui-col-md6">
                <div class="layui-card">
                    <div class="layui-card-header">数据统计</div>
                    <div class="layui-card-body">
                        <div class="layui-carousel layadmin-carousel layadmin-backlog">
                            <div carousel-item>
                                <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>用户数</h3>
                                            <p><cite style="color: #FF5722;" id="wwcxc"></cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>销售总套数</h3>
                                            <p><cite>${session.om_user.saleNumber}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>总销售额</h3>
                                            <p><cite>${session.om_user.saleMoney}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a href="javascript:" onclick="layer.tips('不跳转', this, {tips: 3});"
                                           class="layadmin-backlog-body">
                                            <h3>待提现金额</h3>
                                            <p><cite>${session.om_user.withdrawalMoney}</cite></p>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%include("/common/foot.html"){}%>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
<script>
    var $;
    layui.use(['index', 'console','table'], function () {
        /*  var $A = layui.AjaxCommon;
          var al = layui.AliangLayui;
          $A.ajax('http://route.showapi.com/32-9', 'post', 'json', {
            'showapi_appid': 28043,
            'showapi_sign': 'fd5ce066f69441bfa078c0ad16129b15',
            'q': 'hello'
          }, function (res) {
            //alert(JSON.stringify(res));
          });*/
        $ = layui.jquery;
        var table = layui.table;
        //展示已知数据

    });
    (function () {
        /*----------------施工角色-健康异常统计-Start--------------------*/
        let admin_healthy_static = new Promise(function (resolve, reject) {
            $.ajax({
                url: "system/healthy_statistics/admin_healthy_static.json",
                type: "POST",
                data: {},
                dataType: "json",
                success: function (ret) {
                    if (ret) {
                        resolve(ret);
                    } else {
                        alert("网络异常，请稍后再试吧" + JSON.stringify(err))
                    }
                },
                error: function (jqXHR, textStatus, errorThrown) {
                }
            });
        });
        admin_healthy_static.then(data => {
            admin_healthy_static_fn(data.worklist, data.daylist);
        });
        /*----------------施工角色-健康异常统计-END---------------------*/

        /*----------------施工角色-缺勤统计-Start--------------------*/
        let admin_att_static = new Promise(function (resolve, reject) {
            $.ajax({
                url: "system/att_checkwork/admin_att_static.json",
                type: "POST",
                data: {},
                dataType: "json",
                success: function (ret) {
                    if (ret) {
                        resolve(ret);
                    } else {
                        alert("网络异常，请稍后再试吧" + JSON.stringify(err))
                    }
                },
                error: function (jqXHR, textStatus, errorThrown) {
                }
            });
        });
        admin_att_static.then(obj => {
            admin_att_static_fn(obj.worklist, obj.daylist);

        });
        /*----------------施工角色-缺勤统计-END--------------------*/

        /*----------------施工角色-精细养护-Start--------------------*/


        /*----------------用户数--------------------*/
        let wwcxc = new Promise(function (resolve, reject) {
            var findAgentUserNumber_url="agent/data/findAgentUserNumber.jhtml"
            $.ajax({
                url: findAgentUserNumber_url,
                type: "POST",
                data: {},
                dataType: "json",
                success: function (ret) {
                    if (ret) {
                        resolve(ret);
                    } else {
                        alert("网络异常，请稍后再试吧" + JSON.stringify(err))
                    }
                },
                error: function (jqXHR, textStatus, errorThrown) {
                }
            });
        });
        wwcxc.then(obj => {
            var num=obj.data.length;
            $("#wwcxc").text(num);

        });
        /*----------------施工角色-巡查豆腐-END--------------------*/
        /*----------------施工角色-巡查图-Start--------------------*/
        let sctu = new Promise(function (resolve, reject) {
            $.ajax({
                url: "system/count/patrolCompleteByMonth.jhtml",
                type: "POST",
                data: {},
                dataType: "json",
                success: function (ret) {
                    if (ret) {
                        resolve(ret);
                    } else {
                        alert("网络异常，请稍后再试吧" + JSON.stringify(err))
                    }
                },
                error: function (jqXHR, textStatus, errorThrown) {
                }
            });
        });
        sctu.then(obj => {
            //console.log(obj,1111111111111111111111111);
            xcctu(obj.data.month,obj.data.com,obj.data.unCom);

        });
        /*----------------施工角色-巡查豆腐-END--------------------*/


    }())

</script>
</body>
</html>